<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="viewport" content="target-densitydpi=device-dpi, width=640px, user-scalable=no">
    <meta name="apple-themes-web-app-capable" content="yes">
    <meta content="yes" name="apple-mobile-web-app-capable">
    <meta content="black" name="apple-mobile-web-app-status-bar-style">
    <meta content="telephone=no" name="format-detection">
    <meta content="email=no" name="format-detection">
    <meta name="format-detection" content="telephone=no">
    <title>好文信息</title>
    <link rel="stylesheet" href="/static/index/css/main.css" type="text/css" media="all">
    <script src="http://res2.wx.qq.com/open/js/jweixin-1.4.0.js"></script>
    <style type="text/css">
        .institutionContent {
            text-align: center;
            margin-top: 10px;
        }

        .card {
            background-color: white;
            margin-bottom: 20px;
            border-radius: 10px;
            padding: 10px;
            box-shadow: 2px 2px 10px #ccc;
        }

        .location {
            font-size: 22px;
            color: #999;
            text-align: center;
            width: 100%;
        }
        .detail{
            float: right;
            margin-right: 15px;
            background-color: #1F9532;;
            width: 100px;
            text-align: center;
            color: white;
            border-radius: 9px;
            font-weight: 500;
        }
        .articleContent img{
            width: 100%;
        }
    </style>
</head>

<body>
<!--页面加载 开始-->
<div id="preloader">
    <div id="status">
        <p class="center-text"><span>拼命加载中···</span></p>
    </div>
</div>
<!--页面加载 结束-->

<div id="content_div">
    <div class="header">
        <a href="javascript:history.go(-1);" class="fanhui"></a>
        好文详情
    </div>
    <div class="page" style="margin-left: 10px;    margin-right: 10px;width: 620px;">
        <div class="card">
            <div class="bt">{$articleInfo['art_title']}</div>
            <div class="location">
                <span>所属分类：{$articleInfo['bind_category']['acc_name']}</span>
                <span style="margin-left: 50px;">浏览量：{$articleInfo['art_view_times']}</span>
            </div>
        </div>
<!--        <div class="card">-->
<!--            <span>所属机构：{$articleInfo['bind_institution']['ins_name']}</span>-->
<!--            <span class="detail" id="detail">详情</span>-->
<!--        </div>-->
        <div class="card articleContent" style="font-size: 20px">
            {$articleInfo['art_content']}
        </div>
    </div>
</div>


<!--储存经纬度-->
<input type="hidden" id="longitude" value="-1">
<input type="hidden" id="latitude" value="-1">
<div class="foot_nav">
    <ul>
        <li>
            <a href="/" >
                <img src="/static/index/images/nav1.png"/>
                <p>首页</p>
            </a>
        </li>
        <li>
            <a href="{:url('index/Institution/institutionList')}">
                <img src="/static/index/images/nav2.png"/>
                <p>培优</p>
            </a>
        </li>

        <li >
            <a href="{:url('index/Article/goodClassList')}">
                <img src="/static/index/images/nav3.png" style="width: 45px;height: 42px;margin-top: -6px;"/>
                <p>好课</p>
            </a>
        </li>
        <li class="active">
            <a href="{:url('index/Article/goodArticleList')}">
                <img src="/static/index/images/nav4-active.png"/>
                <p>好文</p>
            </a>
        </li>
        <li>
            <a href="http://wechat.wx.0579bb.com/app/index.php?i=7&c=entry&do=forum&m=meepo_bbs">
                <img src="/static/index/images/nav5.png"/>
                <p>BBS</p>
            </a>
        </li>
    </ul>
</div>



<!--底部结束-->
<script type="text/javascript" src="/static/index/js/zepto.js"></script>
<script type="text/javascript" src="/static/index/js/carousel-image.js"></script>
<script>
    $('.carousel-image').CarouselImage({
        num: $('.carousel-image .carousel-num'),
        repeat: true
    });
</script>
<script type="text/javascript" src="/static/index/js/jquery.min.js"></script>
<script type="text/javascript" src="/static/index/js/common.js"></script>
<script type="text/javascript">
    $("#detail").click(function () {
        var latitude = $("#latitude").val();
        var longitude = $("#longitude").val();
        var url = "{:url('index/Institution/institutionDetail')}?ins_id={$articleInfo['art_institution_id']}&location=" + longitude
            + "," + latitude;
        window.location.href = url;
    });
</script>
<script type="text/javascript">
    $(function () {
        //配置微信参数获取坐标
        wx.config({$SDKParams});
        wx.ready(function () {
            // config信息验证后会执行ready方法，所有接口调用都必须在config接口获得结果之后，config是一个客户端的异步操作，所以如果需要在页面加载时就调用相关接口，则须把相关接口放在ready函数中调用来确保正确执行。对于用户触发时才调用的接口，则可以直接调用，不需要放在ready函数中。
            wx.getLocation({
                type: 'wgs84', // 默认为wgs84的gps坐标，如果要返回直接给openLocation用的火星坐标，可传入'gcj02'
                success: function (res) {
                    var latitude = res.latitude; // 纬度，浮点数，范围为90 ~ -90
                    var longitude = res.longitude; // 经度，浮点数，范围为180 ~ -180。
                    $("#latitude").val(latitude);
                    $("#longitude").val(longitude);
                },
                fail: function (res) {
                },
                complete: function () {
                    $("#statusIndex").fadeOut();
                    $("#preloaderIndex").delay(150).fadeOut("slow");
                }
            });

            //用户分享
            wx.updateAppMessageShareData({
                title: '{$articleInfo["art_title"]}', // 分享标题
                desc: '{$articleInfo["desc"]}', // 分享描述
                link: '{$articleInfo["url"]}', // 分享链接，该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
                imgUrl: '{$articleInfo["imageUrl"]}', // 分享图标
                success: function () {
                    // 设置成功
                    console.log("分享成功");
                }
            })


        });
    })
</script>
</body>
</html>
